#version 330 core
// out vec4 FragColor;
layout (location = 0) out vec4 FragColor;
layout (location = 1) out vec4 BrightColor;

uniform vec4 color;

void main()
{
    // FragColor = vec4(1.0, 1.0, 1.0, 1.0); // set alle 4 vector values to 1.0
    FragColor = color;

    // Check whether fragment output is higher than threshold, if so output as brightness color
    float brightness = dot(FragColor.rgb, vec3(0.2126, 0.7152, 0.0722));
    if(brightness > 1.0)
        BrightColor = vec4(FragColor.rgb, 1.0);
}
